package Code.JumpControl;

public class demo1 {
    public static void main(String[] args) {
        //在循环的过程中跳转到其他语句上执行

        for (int i = 1; i <= 5; i++) {
            if (i == 3) {
                //结束本次循环，继续下一次循环
                continue;
            }
            System.out.println("吃第" + i + "个包子");
        }


        for (int i = 1; i <= 5; i++) {
            System.out.println("吃第" + i + "个饺子");
            if (i == 3) {
                //结束整个循环
                break;
            }

        }
    }
}
